#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string d;
	d = "Z";
	for (int i = 1; i <= 26; i++)
		d += 'A' + i - 1;

	int n, a;
	string s;
	cin >> n;

	while (n > 26) {
		a = n % 26;
		n = (n - 1) / 26;
		s += d[a];
	}
	s += d[n];

	reverse(s.begin(), s.end());
	cout << s;
	return 0;
}
